﻿@model CmsEntityMetaModelContainer
           
<ol class="b-form__rows ul-reset g-clear">       
    @for (int i = 0; i < Model.Metas.Count; i++ )
    {        
        <li class="b-form__row g-clear">
            @Html.ValidationMessageFor(m=>m.Metas[i].Value)
            @Html.HiddenFor(m => m.Metas[i].Name)
            @Html.HiddenFor(m => m.Metas[i].Type)
            @Html.HiddenFor(m => m.Metas[i].IsRequired)
            <label for="@Html.GetClientIdFor(m => m.Metas[i].Value)">@Model.Metas[i].Label

            @if (Model.Metas[i].IsRequired)
            {
                <span class="b-error-notice_title">*</span>
            }
            </label> 
            @Html.EditorFor(m => m.Metas[i].Value, Model.Metas[i].EditorName, Model.Metas[i].AdditionalValues)     

            
        </li>
    }
</ol>

<script type="text/javascript">
    $(document).ready(function() {
        $.validator.unobtrusive.parse(document);
    });
</script>